import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('ManTs')
export class ManTs extends Component {

    @property(Node)
    man4: any = null;

    start() {

    }

    update(deltaTime: number) {

        console.log(this.man4);

        let man4Position = this.man4.position;
        if (man4Position.y < 300) {
            this.man4.setPosition(man4Position.x - deltaTime * 50, man4Position.y, man4Position.z)
        } else {
            this.man4.setPosition(man4Position.x, man4Position.y - deltaTime * 50, man4Position.z)
        }
    }
}


